package day214;

public class OperDemo {
    public static void main(String[] args) {
        /*
        int a = 5;
        a++;
        System.out.println(a);//6
        int b =6;
        ++b;
        System.out.println(b);//7

        int c=5,d=6;
        System.out.println(c++);//5
        System.out.println(c);//6
        System.out.println(++d);//7
        System.out.println(d);//7

        int a=5,b=5;
        int c = a--;
        int d = --b;
        System.out.println(a);//4
        System.out.println(b);//4
        System.out.println(c);//5
        System.out.println(d);//4
         */
        /*
        int a=5,b=10,c=5;
        boolean d = b<c;
        System.out.println(d);//false
        System.out.println(a>b);//false
        System.out.println(a<=c);//true
        System.out.println(a==c);//true
        System.out.println(a!=b);//true
        System.out.println(a%2>0);//true
        System.out.println(a++>c);//false
        System.out.println(a++>c);//true
        System.out.println(a);

        int a=5,b=10,c=5;
        boolean b1 = b>a && b>c;
        System.out.println(b1);
        int age=36;
        System.out.println(age>=0 && age<50);



        int ax = 3;
        int ay = 30;
        int x1 = 0;
        int x2 = 50;
        int y1 =20;
        int y2 =40;
        boolean c = (ax>=x1 && ax<=x2) && (ay>=y1 && ay <=y2);
        System.out.println(c);


        double money = 520.5;
        if (money >= 500) {
            money = money * 0.8;
        } else {
            money = money * 0.95;
        }
        System.out.println("最终的价格:"+money);


        int a=5,b=10,c=5;
        boolean b1 = !(a>b);
        System.out.println(b1);//!false=true
        boolean c1 = !true;
        System.out.println(c1);

        int a=5,b=10,c=5;
        System.out.println(a>b || b>c);
        System.out.println(a==c || b<c);
        System.out.println(a!=b || b>c);
        System.out.println(a>=c || b>a);

        int a = 5;
        a += 10;
        System.out.println(a);//15
        a *= 2;
        System.out.println(a);//30
        a /= 6;
        System.out.println(a);//5
        a -=3;
        System.out.println(a);//2

        short b = 5;
        b = (short)(b+5);
        System.out.println(b);
        b += 10;//b=(short)(b+10);
        System.out.println(b);

        int age = 39;
        System.out.println("age=");//age=
        System.out.println(age);//39
        System.out.println("age="+age);//age=39
        System.out.println("我今年"+age+"岁了");//我今年39岁了
        String name ="ZJ";
        System.out.println("大家好,我叫"+name);
        System.out.println("大家好,我叫"+name+",今年"+age+"岁了");

        System.out.println(10+20+""+30);//3030
        System.out.println(""+10+30+50);//103050
        System.out.println(20+15+70+"");//105

        int a = 5;
        int b = a>0?1:-1;
        System.out.println(b);

        //找两个数中的最大值
        int a=1,b=2;
        int c =a>b?a:b;
        System.out.println(c);
         */



    }
}




